<div class="modal fade" id="issueAddDialog" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog" style="width:95%;height:400px;">

        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span
                        class="sr-only">Close</span></button>
                <h4 class="modal-title" id="myModalLabel">

                    <div ng-if="models.issueDetailMode=='create'">
                        添加新期刊
                    </div>
                    <div ng-if="models.issueDetailMode=='modify'">
                        修改新期刊
                    </div>
                </h4>
            </div>
            <form class="form-horizontal" role="form">

                <div class="row">

                    <div class="col-md-12">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">请选择期刊类型</label>
                            <div class="col-sm-10">
                                <select ng-model="models.selectNewPreiodId" class="form-control" required
                                        ng-options="item.id as item.name for item in models.periodicalTypes">
                                    <option value="">请选择要添加的期刊类型</option>
                                </select>
                            </div>
                        </div>
                    </div>

                    <div class="col-md-12">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">请选择年份</label>
                            <div class="col-sm-10">
                                <select ng-model="models.selectedNewYear" class="form-control" required
                                        ng-options="item for item in models.yearList">
                                </select>
                            </div>
                        </div>
                    </div>

                    <div class="col-md-12">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">请选择期数</label>
                            <div class="col-sm-10">
                                <select ng-model="models.selectedNewMonth" class="form-control" required
                                        ng-options="item for item in models.monthList">
                                </select>
                            </div>
                        </div>
                    </div>

                    <div class="col-md-12">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">摘要</label>
                            <div class="col-sm-10">
                                <input class="form-control" ng-model="models.newSummary" type="text"
                                       placeholder="该输入摘要">
                            </div>
                        </div>
                    </div>

                    <div class="col-md-12">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">详细描述</label>
                            <div class="col-sm-10">
                                <input class="form-control" ng-model="models.newDescription" type="text"
                                       placeholder="该输入详细描述">
                            </div>
                        </div>
                    </div>

                    <div class="col-md-12">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">出版日期</label>
                            <div class="col-sm-10">
                                <input class="form-control" ng-model="models.newPublshDate" type="text"
                                       placeholder="该输入英文摘要">
                            </div>
                        </div>
                    </div>

                    <div class="col-md-12">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">英文摘要</label>
                            <div class="col-sm-10">
                                <input class="form-control" ng-model="models.newSummary_en" type="text"
                                       placeholder="该输入出版日期">
                            </div>
                        </div>
                    </div>

                    <div class="col-md-12" ng-if="models.issueDetailMode=='create'">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">请选择封面照片</label>
                            <div class="col-sm-10">
                                <div class="row">
                                    <div class="form">
                                        <input type="file" nv-file-select="" uploader="uploader" multiple/><br/>
                                    </div>
                                </div>
                                <div class="row">
                                    <table class="table">
                                        <thead>
                                        <tr>
                                            <th width="50%">Name</th>
                                            <th ng-show="uploader.isHTML5">Size</th>
                                            <th ng-show="uploader.isHTML5">Progress</th>
                                            <th>Status</th>
                                            <th>Actions</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <tr ng-repeat="item in uploader.queue">
                                            <td>
                                                <strong>{{ item.file.name }}</strong>
                                                <div ng-show="uploader.isHTML5"
                                                     ng-thumb="{ file: item._file, height: 100 }"></div>
                                            </td>
                                            <td ng-show="uploader.isHTML5" nowrap>{{ item.file.size/1024/1024|number:2
                                                }}
                                                MB
                                            </td>
                                            <td ng-show="uploader.isHTML5">
                                                <div class="progress" style="margin-bottom: 0;">
                                                    <div class="progress-bar" role="progressbar"
                                                         ng-style="{ 'width': item.progress + '%' }"></div>
                                                </div>
                                            </td>
                                            <td class="text-center">
                                                <span ng-show="item.isSuccess"><i
                                                        class="glyphicon glyphicon-ok"></i></span>
                                                <span ng-show="item.isCancel"><i
                                                        class="glyphicon glyphicon-ban-circle"></i></span>
                                                <span ng-show="item.isError"><i
                                                        class="glyphicon glyphicon-remove"></i></span>
                                            </td>
                                            <td nowrap>
                                                <button type="button" class="btn btn-danger btn-xs"
                                                        ng-click="item.remove()">
                                                    <span class="glyphicon glyphicon-trash"></span>删除
                                                </button>
                                            </td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="col-md-12">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">

                            </label>
                            <div class="col-sm-10">
                                <button type="button" class="btn btn-success btn-s form-control" ng-click="saveNewsIssue()"  ng-disabled="uploader.getNotUploadedItems().length==0">
                                    <span class="glyphicon glyphicon-upload"></span>保存
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            </div>
        </div>


        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>
<!-- /.modal -->
